package vista.test;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import vista.PanelReservas;
import modelo.dao.DAO;
import modelo.dao.implementacion.DAOImpl;
import controlador.Controlador;
import controlador.implementacion.ControladorImpl;

public class VentanaDePruebas extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					DAO dao = new DAOImpl();
					Controlador controlador = new ControladorImpl(dao);
					VentanaDePruebas frame = new VentanaDePruebas(dao, controlador);
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public VentanaDePruebas(DAO dao, Controlador controlador) {
		setTitle("JustLunch - Ventana de pruebas.");
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		setSize(1024,768);
		setLocationRelativeTo(null);
		contentPane = new PanelReservas(dao, controlador);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
	}

}
